#include <stdio.h>
#include <string.h>
int main() 
{
    char str[100], *p;
    gets(str);
    p = str;
    while ((p = strstr(p, "foo")) != NULL) 
	{
        strncpy(p, "xxx", 3);
        p += 3;
    }
    printf("%s\n", str);
    return 0;
}